1. Field of the Invention
The present invention relates to a communication device having a control program stored in a storage medium.
2. Description of the Related Art
In common communication devices, a control program is stored in a storage medium such as a read only memory (ROM).
The ROM also stores a checksum used to detect an error in a program. The checksum refers to the sum of all the program data stored in the ROM, and it has a valid value when there is no error in the stored program. Before installing a ROM in a communication device, all program data stored in the ROM is read, and the sum of the data is calculated. The resultant sum is compared with the checksum. If the resultant sum is valid, it is concluded that the program is correctly stored in the ROM, and the ROM is installed in the communication device.
With this technique, although it is possible to detect an error in a ROM when the ROM is installed in a communication device, it nonetheless becomes impossible to read the program if the stored program is destroyed or a failure occurs in a circuit for reading the program after the communication device has been shipped.
In the case where the operation of the communication device stops due to such an error or failure, a user can easily know that the communication device has suffered a failure. However, in practice, some errors or failures result in abnormal operation only when a particular operation is requested, and thus the communication device may operate correctly almost always unless that particular operation is performed. In such a case, it is difficult to know the cause of the problem. Moreover, in some cases, the error or failure ultimately results in trouble fatal to the device.